package com.ym.domain.model.bo;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.io.Serial;
import java.io.Serializable;

@Data
public class CusRegisterBo  implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @NotBlank(message = "手机号码不能为空")
    @NotNull(message = "手机号不能为空")
    @Length(min = 11, max = 11, message = "手机号只能为11位")
    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
    private String mobile;

    @NotBlank(message = "密码不能为空")
    @NotNull(message = "密码不能为空")
    @Length(max = 20, message = "密码长度不能超过20")
    private String pwd;

}
